home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 January / EnigmA AMIGA RUN 33 (1999)(G.R. Edizioni)(IT)[!][issue 1999-01].iso / earcd / faq / amiga / introduction / part2.z / part2
Text File  |  1999-01-01  |  51KB  |  1,193 lines

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!newsserver.pixel.kodak.com!frankensun.altair.com!wlbr!news.cerf.net!qualcomm.com!ihnp4.ucsd.edu!swrinde!tank.news.pipex.net!pipex!blackbush.xlink.net!zib-berlin.de!news.uni-ulm.de!news.belwue.de!news.uni-stuttgart.de!uni-regensburg.de!lrz-muenchen.de!informatik.tu-muenchen.de!kellerer
  2. From: kellerer@informatik.tu-muenchen.de (Ignaz Kellerer)
  3. Newsgroups: comp.sys.amiga.introduction,comp.sys.amiga.misc,comp.sys.amiga.programmer,comp.answers,news.answers
  4. Subject: Amiga FAQ (Frequently asked questions) (Part 2 of 4)
  5. Supersedes: <AmigaFAQ-2-824230821@informatik.tu-muenchen.de>
  6. Followup-To: comp.sys.amiga.introduction
  7. Date: 9 Apr 1996 16:00:27 GMT
  8. Organization: InternetNews at TUM, Technical University of Munich, Germany
  9. Lines: 1169
  10. Approved: news-answers-request@MIT.EDU
  11. Distribution: world
  12. Expires: Sunday, 12 May 96 18:00:24 MESZ
  13. Message-ID: <AmigaFAQ-2-829065624@informatik.tu-muenchen.de>
  14. References: <AmigaFAQ-1-829065624@informatik.tu-muenchen.de>
  15. Reply-To: kellerer@informatik.tu-muenchen.de (Ignaz Kellerer)
  16. NNTP-Posting-Host: hphalle3g.informatik.tu-muenchen.de
  17. Content-Type: text/plain; charset=ISO-8859-1
  18. Content-Transfer-Encoding: 8bit
  19. Summary: Frequently asked questions on the Amiga.
  20.          New users should read this!
  21. Originator: kellerer@hphalle3g.informatik.tu-muenchen.de
  22. Xref: senator-bedfellow.mit.edu comp.sys.amiga.introduction:9126 comp.sys.amiga.misc:118792 comp.sys.amiga.programmer:89201 comp.answers:18061 news.answers:69048
  23.  
  24. Posted-By: auto-faq 2.4
  25. Archive-name: amiga/introduction/part2
  26. Last-modified: Tuesday, 9. March 1996
  27. Posting-Frequency: ever fourth week
  28.  
  29.  
  30.     Frequently asked questions (FAQ) concerning the Amiga. [2/4]
  31.     ------------------------------------------------------------
  32.  
  33. This is the second part of the Amiga-FAQ. It is in Ascii format to be
  34. easily read by everyone. It is also available in AmigaGuide, Dvi and
  35. html (for WWW servers) format as part of the Amiga-FAQ archive.
  36. (File docs/misc/AmigaFAQ.lha on any Aminet site)
  37.  
  38. Please note the following:
  39.  
  40.   - Changes since the last posting are marked with a
  41.     !    changed this line/section, respectively
  42.     +    added this line
  43.     <    removed something before this line
  44.  
  45.   - An index is at the bottom of this part. If this still doesn't help:
  46.     E-mail me, probably I can include an answer into the FAQ.
  47.  
  48.   - Suggestions, contributions, critics and beer bottles are very
  49.     welcome. :-) Send them to:
  50.  
  51.         Ignaz Kellerer
  52.         Georg-Habel-Str. 11
  53.       81241 Muenchen (Germany)
  54.         Tel. (+49) 089 / 885147
  55.  
  56.         Internet: kellerer@informatik.tu-muenchen.de
  57.  
  58. ===========================(Cut here)=========================================
  59.  
  60.  
  61.   Disclaimer
  62.  
  63.   1 CPU, Custom chips, RAM and other stuff
  64.     1 What are 68EC020, 68EC030 and 68LC040?
  65.     2 What's an FPU?
  66.     3 Can I use a 3.5' HD in my A1200?
  67.  
  68.   2 The Operating System
  69.     1 Can I use another Kickstart than the builtin?
  70.     2 The Graphical User Interface
  71.     3 What is MUI?
  72.       1 Icon collections and Backgrounds
  73.     4 What is the Amiga equivalent of . (Current directory)?
  74.     5 The PIPE: queue-handler
  75.       1 Using PIPE: in a standard AmigaShell environment
  76.       2 The Pipe command
  77.       3 Pipe command support in AmigaShell
  78.       4 Quick usage guide
  79.       5 Related things
  80.       6 Troubleshooting
  81.     6 ARexx, the program control language
  82.  
  83.   3 How about Graphics?
  84.     1 What are chunky and planar displays?
  85.     2 What is doublebuffering?
  86.     3 What monitors will work on my Amiga 1200/4000?
  87.     4 How do I switch between PAL and NTSC?
  88.  
  89.   4 Programming
  90.     1 What documentation do I need as an Amiga programmer?
  91.     2 What is CATS?
  92.     3 Where do I get the Amiga includes?
  93.     4 How do I become a developer?
  94.     5 What compilers (assemblers) are there?
  95.     6 Those never working Esc sequences!
  96.     7 Is it possible to use AmigaBasic on the A1200?
  97.     8 How do I localize my program?
  98.     9 How to obtain a pointer to a console's window
  99.     10 What are pragmas?
  100.     11 My Compiler/Linker is complaining about missing symbol xxx.
  101.     12 Where do I find the function xxx?
  102.     13 The GNU C compiler: general information and installation
  103.       1 Current Version
  104.       2 Requirements
  105.       3 Authors
  106.       4 Sources for Gcc
  107.       5 Inline Headers
  108.       6 Amiga Libraries
  109.       7 Installation
  110.       8 Compiling
  111.       9 How to get help
  112.  
  113.   5 Applications
  114.     1 Text Editors
  115.     2 What word processors are there?
  116.     3 Desktop Publishing
  117.     4 What is TeX and where can I get it?
  118.     5 Are there any Postscript interpreters?
  119.       1 Amiga Font Formats
  120.       2 Frequently Requested Amiga Fonts
  121.       3 Commercial Font Sources
  122.       4 Non-Latin fonts on the Amiga
  123.       5 Amiga Font Installation
  124.       6 Amiga Font Utilities
  125.       7 Making Outline Fonts
  126.       8 Problems and Possible Solutions
  127.     6 How to deal with Non-Latin texts?
  128.       1 Japanese editors and viewers
  129.       2 Chinese text viewers
  130.  
  131.   6 Connecting your Amiga to the world
  132.  
  133.   7 Emulators
  134.     1 Can I run Unix on my Amiga?
  135.     2 Is it possible to use the Amiga as X11 terminal?
  136.     3 Is there a way to start MS-Dos programs?
  137.     4 How to mount MsDos-formatted Syquests on Amiga
  138.  
  139.   8 Miscellaneous
  140.     1 Is there any unix version of LhA?
  141.     2 What are files ending with ...?
  142.     3 Is there a Stacker-like utility to pack my hard drive?
  143.     4 Where do I get Fish disk xxx?
  144.  
  145.   9 Where and how do I get software and other informations?
  146.     1 Files and databases on freely distributable software
  147.     2 A collection of tests
  148.     3 Getting files from a FTP server
  149.     4 Getting files from a Mail server
  150.     5 Getting files from a mailbox
  151.     6 The Fish PD series
  152.       1 The Amiga Library disks
  153.       2 The Fresh Fish CD-Roms
  154.     7 How do I Read and write MS-Dos disks?
  155.     8 How do I split large files?
  156.     9 Discussing things
  157.     10 Other FAQ's
  158.  
  159.   The Amiga-FAQ archive
  160.  
  161.   Contributions
  162.  
  163.   Credits
  164.  
  165.   Index
  166.  
  167.  
  168.  
  169.   4 Programming
  170.   *************
  171.   
  172.      This chapter handles problems arising for programmers and
  173.   compiler-users only.
  174.   
  175.   4.1 What documentation do I need as an Amiga programmer?
  176.   ========================================================
  177.   
  178.      The best information available are the RKMs (ROM Kernel Manuals), 3rd
  179.   edition, by Commodore, published by Addison-Wesley:
  180.        The Amiga ROM Kernel Manual:  Libraries, ISBN 0-201-56774-1
  181.        The Amiga ROM Kernel Manual:  Devices, ISBN 0-201-56775-X
  182.        The Amiga ROM Kernel Manual:  Includes and Autodocs, ISBN
  183.                                                             0-201-56773-3
  184.        The Amiga Hardware Manual, ISBN 0-201-56776-8
  185.        The Amiga User Interface Style Guide, ISBN 0-201-57757-7
  186.   
  187.   Especially the RKM: Libraries is a must. The RKM: Includes and Autodocs
  188.   isn't that much worth: Better get the same stuff on disk instead to
  189.   have it online.  See Includes.
  190.   
  191.      AmigaDOS isn't included in these books. The Autodocs give much
  192.   information, but to go deeper you probably need
  193.        The AmigaDOS Manual, 3rd Edition, ISBN 0-553-35403-5
  194.      published by Bantam Books.
  195.   
  196.      A better choice for developers is
  197.        The Amiga Guru Book
  198.   
  199.   by Ralph Babel. The book starts with a survey on different aspects of
  200.   programming the Amiga. (About 250 pages) Useful for beginners are the
  201.   sections on the Amiga's data types (not to be confused with the 3.x
  202.   DataTypes used by MultiView, for example), the Includes and the
  203.   amiga.lib. But even experienced programmers will find useful things
  204.   here that are missing in the RKMs.  But the largest part are about 500
  205.   pages on AmigaDOS and, as I think, the most important, because AmigaDOS
  206.   is the worst officially documented part of the OS. The book is rather
  207.   concise and hence not as easy to read as the RKMs, but I recommend it
  208.   as an addition and instead of the AmigaDOS manual.  (Not, however, a
  209.   replacement for the Libraries and Devices, which aren't covered here.)
  210.   Unfortunately the book has no ISBN and is available in special stores
  211.   only. But there are some mail order companies which offer it for about
  212.   50$ and which accept credit cards:
  213.   
  214.                                    Almathera Systems Limited
  215.                                    Southerton House
  216.        NBG USA, Inc.               Boundary Business Court
  217.        482 Holly Avenue            92-94 Church Road
  218.        St. Paul, MN 55102          Mitcham, Surrey CR4 3TD
  219.        USA                         England
  220.        Voice: +1 (612) 290 9447    Voice: +44 181 687 0040
  221.        Fax:   +1 (612) 290 9449    Fax:   +44 181 687 0490
  222.                                    E-Mail: <almathera@cix.compulink.co.uk>
  223.        
  224.                                    Stefan Ossowskis Schatztruhe
  225.        Hirsch & Wolf OHG           Gesellschaft für Software mbH
  226.        Mittelstraße 33             Veronikastraße 33
  227.        D-56564 Neuwied             D-45131 Essen
  228.        Germany                     Germany
  229.        Voice: +49 (2631) 8399-0    Voice: +49 (201) 788778
  230.        Fax:   +49 (2631) 8399-31   Fax:   +49 (201) 798447
  231.                                    E-Mail: <stefano@tchest.e.eunet.de>
  232.        
  233.        Someware
  234.        27 rue Gabriel Péri
  235.        59186 Anor
  236.        France
  237.        Voice: +33 27596000
  238.        Fax:   +33 27595206
  239.        E-Mail: <didierj@swad.someware.com>
  240.      See FAQs.
  241.   
  242.   4.2 What is CATS?
  243.   =================
  244.   
  245.      This is a department at Commodore West Chester which was formerly
  246.   named `Commodore Amiga Technical Support' and was later renamed
  247.   `Commodore Application and Technical Support'. These are people that
  248.   work independently of Engineering, but close together with them, and try
  249.   to help developers outside of Commodore to create nice Amiga
  250.   applications, software or hardware. To achieve this, CATS has gathered
  251.   a lot of informations and tools, on floppy, CD, or paper. Much of this
  252.   material is also available to the general public. (1) But don't mix
  253.   this up with some sort of Hotline for everyone!
  254.   
  255.      For Americans the address to get this material is
  256.            CATS
  257.            Commodore Electronics Limited
  258.            950 Rittenhouse Road
  259.            Norristown, PA 19403
  260.   
  261.   for all Europeans it's a company in Germany:
  262.            Fa. Hirsch & Wolf
  263.            Mittelstr. 33
  264.            56564 Neuwied
  265.            Tel. 02631/83990
  266.   
  267.      Dr. Peter Kittel, peterk@cbmger.de.so.commodore.com
  268.   
  269.      ---------- Footnotes ----------
  270.   
  271.      (1)  Which means: For Non-Developers.
  272.   
  273.   4.3 Where do I get the Amiga includes?
  274.   ======================================
  275.   
  276.      The only legal way to get the includes and autodocs (and you *should*
  277.   get them, they are *very* useful!) is to become a developer (see
  278.   Developer) or to buy the `NDU' (Native developers update kit, also
  279.   known as `NDUK' or `NDK'), which is offered by CATS. They cost about
  280.   30$ plus shipping and this seems to me to be a fair price. See CATS.
  281.   The current version is 3.1.
  282.   
  283.      If you need only the includes, you could get them as well with a
  284.   compiler (commercial compilers only) or by getting the Fresh Fish CD.
  285.   See Fish CD.
  286.   
  287.   4.4 How do I become a developer?
  288.   ================================
  289.   
  290.      You need the `ADSP' (Amiga Developer Support Program) documents. To
  291.   get this write a letter to your local Commodore branch asking for these
  292.   documents.  Everything else should be explained there. The german
  293.   address (for the US address see CATS) is
  294.            Commodore
  295.            Lyoner Strasse 38
  296.            60528 Frankfurt
  297.      There are three different developer versions:
  298.   *Registered*
  299.        developers get access to the CBMNET (kind of a Commodore-internal
  300.        Usenet), which makes it possible to discuss problems with other
  301.        developers, Commodore engineers included. Registered developers
  302.        pay about US$80 per year, plus initial US$30 initially.
  303.   
  304.   *Certified*
  305.        developers seem to me the most interesting claass: They have the
  306.        possibility copy the most beta versions of the system software
  307.        (Kickstart and Workbench) and the respective Includes and
  308.        AutoDocs. (Not all beta versions and especially no beta hardware.)
  309.        You pay about US$250 per year plus US$50 initially for this.
  310.   
  311.   *Commercial*
  312.        developers finally have in most details the same as certified
  313.        developers, but may expect to get more beta versions and sooner,
  314.        included beta hardware (This has *not* always been so in the
  315.        past.), hencethey pay about US$400 plus US$50 initially.
  316.   
  317.   The above describes the prices and the situation in Germany and might be
  318.   different elsewhere. Especially not all Commodore branches offer the
  319.   registered status. A hint is to build a group of users and become a
  320.   developer group, so the costs are reduced.
  321.   
  322.      All developers have to sign non-disclosure agreements (`NDA') which
  323.   specify that we may not discuss information outside of authorized areas
  324.   even to other developers until given explicit permission by Commodore.
  325.   
  326.   4.5 What compilers (assemblers) are there?
  327.   ==========================================
  328.   
  329.      There is a lot of programming languages on the Amiga, commercial as
  330.   well as freely distributable. I will enumerate only those that I know
  331.   or which seem it worth to me otherwise.
  332.   
  333.   *Assembler*
  334.        All C-compilers have an Assembler included. Freely distributable
  335.        are A68K and PhxAss (directory `dev/asm' on Aminet or Fish disks
  336.        521 and 906)
  337.   
  338.        Commercial Assemblers are MaxonASM, OMA3.0 and DevPack3.14.
  339.   
  340.   *Basic*
  341.        The following commercial Basic-compiler/interpreter are available:
  342.        BlitzBasic2, Amos and MaxonBasic3.
  343.   
  344.   *C*
  345.   *C++*
  346.        Freely distributable C-compilers are `gcc' (which has its own
  347.        directory `dev/gcc' on Aminet) and the evaluation version of
  348.        `Dice' (for example per FTP from `ftp.uni-paderborn.de', directory
  349.        `/news/comp.binaries.amiga/volume91/languages' or on Fish disk
  350.        491).  The advantage of gcc is that you find gcc versions all over
  351.        the world and on all computer systems. Another advantage is that
  352.        C++ is included into gcc! But it is slow and needs 4Mb of RAM or
  353.        more.  See The GNU C compiler.  See Mailing lists.
  354.   
  355.        Commercial C compilers are `Aztec-C', `Dice', `SAS/C' amd
  356.        `MaxonC++'.  `Aztec-C' doesn't seem to get further development any
  357.        more.  It should be remarked that the commercial compilers have
  358.        especially wonderful debugging utilities (Source level debuggers!)
  359.        that the others are missing.
  360.   
  361.        SAS has announced to drop support of the Amiga-Compiler, too, due
  362.        to the Amiga's bad situation. However, the compiler is still
  363.        available and up-to-date and has a crosscompiler included, which
  364.        translates C++ to C and supports the source level debugger too.
  365.        Considering the price of just 99$ for students and updates from
  366.        recent versions or other compilers it is still the most
  367.        recommendable of the three. In europe the compiler is available
  368.        from
  369.                 SAS Institute, Inc.           SAS Institute Gmbh
  370.                 Book Sales                    PO Box 10 53 40
  371.                 SAS Campus Drive              69043 Heidelberg
  372.                 Cary, NC 27513                Germany
  373.                 USA
  374.             
  375.                 Phone: (919)677-8000          Phone: (49)6221-4160
  376.                 EMail: sasdsb@vm.sas.com      EMail: eurdoc2@vm.sas.com
  377.   
  378.        Dice is the cheapest and fastest commercial compiler. The greatest
  379.        disadvantage of Dice (compared to the other commercial compilers)
  380.        is the so-called Source-Line-Debugger: This means that you see the
  381.        current line of source and can execute the program step by step,
  382.        like with the other debuggers. On the other hand you can examine
  383.        memory only, not the variables.  To get information about DICE,
  384.        send email to info@oic.COM. An automatic system will return
  385.        complete details, including upgrade prices.
  386.   
  387.        Comeau C++ is a crosscompiler like SAS/C++. That wouldn't be a
  388.        problem, but Comeau C++ doesn't have a C compiler included.  You
  389.        need SAS/C, Aztec-C or Dice additionally. But it is AT&T cfront 3.0
  390.        compliant and supports exceptions. And like gcc it runs on many
  391.        platforms.  Maxxon C++ is offered in Germany. I cannot say
  392.        anything on it. Both compilers are commercial. Comeau's address is:
  393.                 Comeau computing
  394.                 91-34, 120th Street
  395.                 Richmond Hill, NY, 11418-3214
  396.                 USA
  397.             
  398.                 EMail: Greg Comeau, comeau@bix.com
  399.   
  400.        Maxon C++ is both a C++ and a C compiler. There is a light version
  401.        and a developer version. The developer version matches the AT&T
  402.        standard 3.0.  Maxon-light includes a compiler and a editor.
  403.        Developer includes a source level debugger, Amiga classes library
  404.        and Hot Help with documentation to the amiga libs.  It is a german
  405.        product, and compiler and documentation are german.  The compiler
  406.        has some little bugs, but you can work with it well, anyway.
  407.   
  408.   *Forth*
  409.        JForth is said to be an excellent Amiga port of Forth. Among its
  410.        advantages are object oriented extensions, full Amiga interface
  411.        and an application generator. It is available from:
  412.                 Delta Research
  413.                 P.O. Box 151051
  414.                 San Rafael, CA   94915-1051
  415.             
  416.                 Phone: (415) 453-4320
  417.                 EMail: Phil Burk, phil@ntg.com
  418.                        Mike Haas, haas@starnine.com
  419.   
  420.   *Fortran*
  421.        (Sigh! Still people who need it :-<) Freely distributable are BCF
  422.        (Fish disk 470) and f2c, a Fortran to C converter (Aminet,
  423.        directory `/dev/lang'). A commercial compiler is offered from
  424.        ABSoft. All these are Fortran 77 compilers, I don't know any
  425.        Fortran 90 compiler on the Amiga.
  426.   
  427.   *Lisp*
  428.        Freely distributable Lisp interpreters are XLisp (Fish disk 181)
  429.        and OakLisp (Fish disks 519 and 520) and CLISP
  430.        (`/pub/lisp/clisp/binaries/amiga' at the server `ftp
  431.        ma2s2.mathematik.uni-karlsruhe.de'). Lisp compilers are Gambit
  432.        (Fish 764 and 765) and Scheme-to-C (Fish disks 556, 557 and 558).
  433.        See Mailing lists.
  434.   
  435.   *Prolog*
  436.        `/dev/lang/UNSWProlog.lha' and `dev/lang/sbp3_1e.lha' on Aminet as
  437.        well as `SBProlog' on Fish disk 141 and `SBProlog' on Fish disk
  438.        145 are freely distributable Prolog interpreters.
  439.   
  440.   *Modula-2*
  441.        M2Amiga is offered in Europe, Benchmark Modula-2 in the U.S. Both
  442.        are said to be very good, have a powerful source-level-debugger, a
  443.        large library.  Especially M2Amiga has great support by a german
  444.        user-group (AMOK) which for example offers own PD disks. See
  445.        Mailing lists.
  446.   
  447.        M2Amiga is offered by:
  448.                 A+L AG
  449.                 Daderiz 61
  450.                 2540 Grenchen
  451.                 Schweiz
  452.             
  453.                 Tel.: +41/65/52 03-11
  454.                 Fax:              -79
  455.   
  456.        Benchmark Modula-2 is available from:
  457.                 Armadillo Computing
  458.                 5225 Marymount Drive
  459.                 Austin, Texas 78723
  460.                 USA
  461.             
  462.                 Phone/FAX: 512/926-0360.
  463.                 EMail: Jim Olinger, jolinger@bix.com
  464.   
  465.   *Oberon*
  466.   *Oberon-2*
  467.        Two compilers (both Oberon-2) are available: AmigaOberon
  468.        (commercial) is offered by the same company as M2Amiga. It is
  469.        integrated into a full developers environment and has a large
  470.        library of modules.  Library linker and  source level debugger are
  471.        available.
  472.   
  473.        Oberon-A is a Freeware compiler. (Source: Aminet, `dev/obero'
  474.        directory) However, this is a beta release, especially the module
  475.        library is limited. See Mailing lists.
  476.   
  477.        The AMOK user group supports AmiOberon as well as M2Amiga.
  478.   
  479.        In addition to these two standalone compilers which are thought
  480.        mainly for creating AmigaOS applications, there is an Amiga port of
  481.        the Oberon Sytem V4, too. The Oberon System is implemented as an
  482.        AmigaOS-Task using a separate screen and includes an Oberon-2
  483.        compiler. You can use it to write software that will work on all
  484.        implementations of the Oberon System V4 (for example Macintosh,
  485.        Windows or Sparc) without any changes.
  486.   
  487.   *Pascal*
  488.        There is a PD-compiler called PCQ (Directory `dev/lang' on Aminet
  489.        or Fish disk 511). It doesn't support all of Pascal and major
  490.        features are missing. P2C, a pascal to C converter is on disk 341.
  491.        (Aminet: `/dev/misc/p2c120.lha') Additionally there are two
  492.        commercial compilers called HiSoft Pascal and KickPascal. HiSoft
  493.        Pascal and P2C claim to be compatible to Turbo Pascal up to 5.0.
  494.        HiSoft has a source level debugger included.
  495.   
  496.   4.6 Those never working Esc sequences!
  497.   ======================================
  498.   
  499.      Many printers come with a manual that explains which Esc sequence
  500.   causes which action on the printer. But there happen weird things when
  501.   you try to send these sequences to your printer, either it does
  502.   nothing, or it does something completely different. There is a reason,
  503.   the Amiga printer drivers. These drivers are made in a way that they
  504.   only understand a certain set of `ANSI Esc sequences', not the special
  505.   ones defined (differently) by the various printer manufacturers. The
  506.   purpose is that every application on the Amiga just uses this one
  507.   standard set of control sequences and this way doesn't need to know
  508.   which printer is actually connected. The printer driver then translates
  509.   these standard sequences into the special sequences a certain printer
  510.   understands.  A list of the available ANSI Esc sequences is found in
  511.   the current Workbench manuals (or older AmigaDOS manuals). Now if you
  512.   want to issue a control sequence to the printer that's not available as
  513.   an ANSI command, you have two possibilities to achieve this:
  514.     1. Bypass the printer driver (that would unsuccessfully try to
  515.        interpret the sequence) and send your output *only* during this
  516.        sequence to `PAR:' (or `SER:', respectively). For this you have to
  517.        close and open printer output channels very often which is rather
  518.        tedious, and you have to know where (`PAR:' or `SER:') your
  519.        printer is connected.
  520.   
  521.     2. Use a special ANSI sequence, made exactly for this case:
  522.                 `Esc[<n>"<x>'
  523.        where `<n>' is the decimally typed number of bytes in the string
  524.        `<x>', which actually contains your special printer sequence. This
  525.        ANSI sequence tells the printer driver to not interpret or
  526.        translate the next `<n>' bytes.
  527.           But both methods have one big disadvantage when used in an
  528.   application program: You lose the printer independency! If you stick to
  529.   ANSI sequen- ces, you can output to any printer on earth, as long as
  530.   there is an Amiga printer driver for it. If you start to use special
  531.   control sequences, your program will be tied to this single printer
  532.   model and will not be usefull for any other (or you would have to
  533.   provide some dozen new printer drivers for your application).
  534.   
  535.      Dr. Peter Kittel, peterk@cbmger.de.so.commodore.com
  536.   
  537.   4.7 Is it possible to use AmigaBasic on the A1200?
  538.   ==================================================
  539.   
  540.      AmigaBasic wurde (als einziges Amiga-Programm) von Microsoft
  541.   entwickelt und ist entsprechend fehlerhaft.
  542.   
  543.      Man kann es auf dem A1200 trotzdem zum Laufen bringen, wenn man
  544.   folgendes beachtet:
  545.   
  546.     1. run NoFastMem (or turn off FastMem).
  547.   
  548.     2. Switch off sound output in the Sound prefs editor.
  549.   
  550.     3. Better avoid SUBs and use GOSUBs instead, then the compatibility
  551.        with newer processors will be higher.
  552.   
  553.     4. There is a patch you should run at the beginning of AmigaBasic:
  554.               ---------------------------------- CUT HERE -------------------------------
  555.                `" AmigaBASIC patch to let AmigaBASIC work on A1200 and other newer machines.
  556.                `" Start at the beginning of AmigaBASIC or invoke AmigaBASIC with this program
  557.             
  558.                OPEN "AMIGABasic" AS 1 LEN=1
  559.                FIELD #1,1 AS d$
  560.                i&=&HF3*256+&H87 : PRINT i&
  561.                GET #1,i& : a$=HEX$(ASC(d$))
  562.                PRINT a$
  563.                IF a$="79" THEN
  564.                    LSET d$=CHR$(&H78)
  565.                    PUT #1,i&
  566.                END IF
  567.                CLOSE 1
  568.               ---------------------------------- CUT HERE -------------------------------
  569.   
  570.      Andreas Mixich, humpty@tomate.tng.oche.de
  571.   
  572.   4.8 How do I localize my program?
  573.   =================================
  574.   
  575.      Suggest, you want to write a `HelloLocalWorld.c'. Your final program
  576.   will look like this:
  577.   
  578.            #include "HelloLocalWorld_Cat.h"
  579.            #include <clib/exec_protos.h>
  580.        
  581.            struct Library *LocaleBase;
  582.        
  583.            void main(int argc, char *argv[])
  584.        
  585.            {
  586.                /* Open the locale.library. No kill, if not successfull.
  587.                   (Just use the builtin catalog strings instead.) Note, that
  588.                   we open locale.library here, even if our compiler supports
  589.                   AutoOpening.
  590.                */
  591.                LocaleBase = OpenLibrary("locale.library", 38);
  592.                OpenHelloLocalWorldCatalogs(NULL, NULL);
  593.        
  594.                printf(GetString(MSG_Hello));
  595.        
  596.                CloseHelloLocalWorldCatalog();
  597.                if (LocaleBase) CloseLibrary(LocaleBase);
  598.            }
  599.   
  600.      The routine GetString checks, if the wished catalogs are available
  601.   and returns a pointer to either the builtin string or the catalog
  602.   string. (In my case the german string.)
  603.   
  604.      You see, the main difference besides the minor opening and closing
  605.   stuff (OpenLibrary, OpenHelloLocalWorldCatalogs, ...) (which too can be
  606.   dropped, too, with FlexCat) is to replace strings with a function call.
  607.   Hence we need a file `HelloLocalWorld_Cat.c', which holds
  608.   OpenHelloLocalWorld, GetString, CloseHelloLocalWorld and the builtin
  609.   strings (this could be an array, where
  610.                array[MSG_Hello] = "Hello, local world.\n";
  611.   
  612.   is defined) and an include file `HelloLocalWorld_Cat.h', which defines
  613.   the message ID's like MSG_Hello. You don't need to know, how these files
  614.   work internally, especially you don't need to know `locale.library'!
  615.   
  616.      There are some catalog generators (in what follows: CGs) available
  617.   (`CatComp', for devlopers only, `KitCat', german docs only, `MakeCat',
  618.   which I don't know and `FlexCat', which I  recommend, because it is
  619.   most flexible in the generated source and supports catalogs on 2.0 and
  620.   any language, even Amiga-E, Cluster, Pascal, ... and besides that: I'm
  621.   the author ;-) are tools, that create  HelloLocalWorld_Cat.h,
  622.   HelloLocalWorld_Cat.c and the real catalogs for you. (The above code
  623.   might differ slightly between the different CGs.) (See Aminet, directory
  624.   `dev/misc'.)
  625.   
  626.      Of course they need to know how to use them. First create a so-called
  627.   `catalog-description' file. This could look like this:
  628.            ; Lines beginning with a semicolon are comment lines.
  629.            # language english
  630.            ; the language of the builtin strings
  631.            # version 0
  632.            ; the catalog version (0 = any)
  633.            MSG_Hello (1/15/30)
  634.            Hello, local world
  635.   
  636.   Any string is defined by a line like the last two lines above: MSG_Hello
  637.   is the message-ID, (1/15/30) says, that the value of MSG_Hello should be
  638.   1 (you may omit this, in which case just the next free number is used)
  639.   and the string must not be shorter than 15 characters or longer than 30
  640.   characters. (These may be omitted too.)
  641.   
  642.      Now write your program. Once you are ready, use the CGs to create a
  643.   so-called catalog translation file. (One for any language different than
  644.   the builtin.) In my case (german) this could look like this:
  645.            ; Lines beginning with a semicolon are comment lines.
  646.            ## language deutsch
  647.            ; the catalog language (german)
  648.            ## version $VER: Deutsch.catalog 1.0 (22.12.93)
  649.            ; the catalog files version string
  650.            MSG_Hello
  651.        
  652.            ; Hello, local world
  653.   
  654.   Note the empty line after the message ID. (The arguments of ## language
  655.   and ## version would be missing as well.) You have to fill in the
  656.   german strings here. Again using the CGs you create a catalog file from
  657.   this. Additionally note, that no informations on the strings ID or
  658.   length are behind MSG_Hello.  They are taken from the catalog
  659.   description file.
  660.   
  661.      Once you change the program (adding strings, changing the string
  662.   length) you change the catalog description as well, use the CGs in the
  663.   same way to update the catalog translation and hence the catalogs.
  664.   
  665.   4.9 How to obtain a pointer to a console's window
  666.   =================================================
  667.   
  668.      The following function returns the window pointer of a CON window.
  669.   It can be executed safely under all versions of the Amiga's OS.
  670.   
  671.          struct Window *getConWindowPtr(BPTR fh)
  672.          {
  673.            struct Window *w;
  674.            struct FileHandle *cfh;
  675.            struct StandardPacket *sp;
  676.            struct InfoData *id;
  677.            struct MsgPort *mp;
  678.        
  679.            w = NULL;
  680.        
  681.            if ((cfh = BADDR(fh))->fh_Type != NULL) {
  682.              if (sp = AllocMem(sizeof (struct StandardPacket),
  683.                                MEMF_PUBLIC | MEMF_CLEAR)) {
  684.                if (id = AllocMem(sizeof (struct InfoData),
  685.                                  MEMF_PUBLIC | MEMF_CLEAR)) {
  686.                  if (mp = CreatePort(NULL, 0)) {
  687.                    sp->sp_Msg.mn_Node.ln_Name = (char *) &sp->sp_Pkt;
  688.                    sp->sp_Pkt.dp_Link         = &sp->sp_Msg;
  689.                    sp->sp_Pkt.dp_Port         = mp;
  690.                    sp->sp_Pkt.dp_Type         = ACTION_DISK_INFO;
  691.                    sp->sp_Pkt.dp_Arg1         = MKBADDR(id);
  692.        
  693.                    PutMsg(cfh->fh_Type, &sp->sp_Msg);
  694.                    (void) WaitPort(mp);
  695.                    (void) GetMsg(mp);
  696.        
  697.                    if (sp->sp_Pkt.dp_Res1)
  698.                      w = (struct Window *) id->id_VolumeNode;
  699.        
  700.                    DeletePort(mp);
  701.                  }
  702.                  FreeMem(id, sizeof (struct InfoData));
  703.                }
  704.                FreeMem(sp, sizeof (struct StandardPacket));
  705.              }
  706.            }
  707.        
  708.            return w;
  709.          }
  710.   
  711.      Notes:
  712.      * Accessing a console's window directly may interfere with operations
  713.        performed by the CON handler. Be careful!
  714.   
  715.      * To obtain the window pointer of a CLI's console, pass the
  716.        FileHandle returned by Open("*", MODE_OLDFILE) to the above
  717.        function.
  718.   
  719.      * The result of the above function may well be NULL, e.g. in case of
  720.        an AUX handler or if an AUTO CON handler is unable to open its
  721.        window.
  722.   
  723.      * Sending an ACTION_DISK_INFO packet to an AUTO CON handler (2.0+)
  724.        causes its window to lose its special AUTO properties (i.e. it can
  725.        no longer be closed at any time by clicking on its Close gadget),
  726.        as the window pointer returned in id_VolumeNode must remain valid
  727.        from now on.
  728.   
  729.      * All in all: Don't use this function. :-)
  730.   
  731.      For more information, please refer to pages 273, 276, 435, 463, 485,
  732.   and 629 in "The Amiga Guru Book" (see Manuals).
  733.   
  734.      Ralph Babel, rbabel@babylon.pfm-mainz.de
  735.   
  736.   4.10 What are pragmas?
  737.   ======================
  738.   
  739.      Pragmas are special compiler commmands which control certain
  740.   features of a C-compiler. Two problems arise when using pragmas:
  741.     1. Pragmas are compiler specific. You cannot expect that one compiler
  742.        will understand pragmas of another compiler, even if both run on
  743.        the Amiga.
  744.   
  745.     2. You are not guaranteed that a compiler ignores pragmas, that he
  746.        doesn't understand. Even more: It might not help, to use something
  747.        like this:
  748.                 #ifndef MY_COMPILER
  749.                 #pragma DoAnything
  750.                 #endif
  751.   
  752.   A workaround is to put pragmas in a special include file (BTW, the same
  753.   holds true for statements like #asm (Aztec-C) or #extern (C++) and
  754.   replace the above with
  755.            #ifndef MY_COMPILER
  756.            #include <mypragmas.h>
  757.            #endif
  758.   
  759.      But what do pragmas on the Amiga? The most common usage (not the
  760.   only, but most meant when talking about pragmas) is to tell the
  761.   compiler about how to call library functions: Simple C functions expect
  762.   their arguments on the stack, but library functions want their
  763.   arguments in special processor registers and additionally the `library
  764.   base' in register a6. Lets have a look at a pragma command of the
  765.   Aztec-Compiler.
  766.            #pragma amicall(SysBase,0xd2,FreeMem(a1,d0))
  767.   
  768.   This tells the compiler to put the first argument of FreeMem in register
  769.   a1, the second in register d0 and the value of the variable SysBase in
  770.   register a6. Maxons pragmas look the same, Dice pragmas and SAS pragmas
  771.   look a bit more complicated;
  772.            #pragma libcall SysBase FreeMem d2 0902
  773.   
  774.   Here d2 is (like 0xd2 above) the `library vector offset' (see below),
  775.   the digits 09 are codes for the argument register in reversed order
  776.   (Register codes are 0=d0, 1=d1, .., 8=a0, 9=a1, a=a2, ..), the
  777.   following 0 is the result's registerä(always d0))and the final digit 2
  778.   is the number of arguments.
  779.   
  780.      A command `FreeMem(fib,sizeof(*fib);' could produce the following
  781.   code, if the compiler has seen a pragma statement like above:
  782.            move.l  _fib,a1
  783.            move.l  260,d1        ; sizeof(struct FileInfoBlock)
  784.            move.l  _SysBase,a6
  785.            jsr     -0xd2(a6)       ; 0xd2 = _LVOFreeMem
  786.   
  787.   Calling FreeMem in that way is shorter and faster than pushing the
  788.   arguments on the stack, calling a function _FreeMem which would do just
  789.   the same like the above code by pulling the arguments from the stack.
  790.   
  791.      The best way to use pragmas is to include statements like the
  792.   following in your program:
  793.            /*  SAS/C, Dice and GNU-c (since version 2.6.1) make it    */
  794.            /*  very simple:                        */
  795.            #if defined(__SASC)  ||  defined(_DCC)  ||  defined(__GNUC__)
  796.              #include <proto/exec.h>
  797.            #else
  798.        
  799.              /*  Get the prototype for the function; note, that this    */
  800.              /*  is compiler independent.                */
  801.              #include <clib/exec_protos.h>
  802.        
  803.              /*  Get the pragma; compiler dependent, but most pragmas    */
  804.              /*  are in files with the same name.            */
  805.              #ifdef AZTEC_C
  806.                #include <pragmas/exec_lib.h>
  807.              #elif defined(__MAXON__)
  808.                #include <pragmas/exec_pragmas.h>
  809.              #endif
  810.        
  811.              /*  Declare the SysBase variable                */
  812.              extern struct ExecBase *SysBase;
  813.            #endif
  814.   
  815.   The above example can be compiled on all these compilers and produce the
  816.   best code. (Besides, the proto/*.h-files do nothing else than reading
  817.   clib/*_protos.h and pragmas/*_pragmas.h with #include and then declare
  818.   the SysBase variable.)
  819.   
  820.      A final question arises: How to get the pragmas? Most compilers have
  821.   them included. However, sometimes you want to produce pragmas for
  822.   yourself, for example if you are using new libraries or new versions
  823.   with additional functions. In that case you can produce them from the
  824.   so-called `FD' files which should be a part of the developer docs of
  825.   the library. (The NDU has a directory FD which contains FD files for
  826.   all libraries and devices of the OS. see Includes) Most compilers have
  827.   a utility with the name `fd2pragma' or similar included which can do
  828.   that for you. A freely distributable version which can produce pragmas
  829.   for Aztec, Dice, SAS and Maxon as well as LVO files for assembler and
  830.   stub routines for the tag versions is available on Aminet
  831.   (`dev/misc/fd2pragma2_0.lha' and on the Fish CDs.
  832.   
  833.      For pragmas under gcc see Inline Headers.
  834.   
  835.   4.11 My Compiler/Linker is complaining about missing symbol xxx.
  836.   ================================================================
  837.   
  838.      First be sure, that the function is really missing: For example
  839.   floating point functions are in a special link library and you need a
  840.   linker option like `-lm' to include it into your program. Another
  841.   possibility would be that you are using a library function and didn't
  842.   notice it. This might lead to a missing library base, `IntuitionBase'
  843.   for example. In that case just put something like
  844.            struct Library *IntuitionBase;
  845.   
  846.   somewhere in the global part of your program. (Don't forget to call
  847.   OpenLibrary() and CloseLibrary! :-)
  848.   
  849.      However, you could as well use a function which really isn't present
  850.   in your library at all. If you have, for example, an amiga.lib from 2.0
  851.   you would hardly find the locale functions or the pool memory
  852.   functions. (1) Best solution is to get the NDU (see Includes), but you
  853.   probably don't want to wait for it. In that case you have to find what
  854.   kind of function you are missing.
  855.      * Simple library functions (Examples: `exec/AllocPooled',
  856.        `locale/OpenCatalogA') can be called with pragmas. However, you
  857.        need informations on the name of the library base and where to put
  858.        the arguments. See Pragmas.
  859.   
  860.      * Tag functions are mostly just stub functions which call library
  861.        functions. If you have, for example, `dos/AllocDosObject' which
  862.        expects a constant and a pointer to an array of tags, you have the
  863.        varargs version `AllocDosObjectTags' which expects tags on the
  864.        stack as well! Just create the following function:
  865.                 #include <clib/dos_protos.h>
  866.                 #include <pragmas/dos_pragmas.h>    /*  Probably wrong name */
  867.             
  868.                 void *AllocDosObjectTags(ULONG objtype, Tag tag1, ...)
  869.                 { return(AllocDosObject(objtype, (struct TagItem *) &tag1);
  870.                 }
  871.   
  872.      * Some functions still remain: Amiga.lib has some functions which
  873.        are really doing valuable things and not just call a library: The
  874.        BOOPSI functions (`DoMethod', `DoSuperMethod') the memory pool
  875.        functions (`LibAllocPooled', `LibCreatePool', which are
  876.        replacements of 3.0 functions). The only way to replace these is
  877.        to get equivalents. The AmigaFAQ archive contains some of them
  878.        (DoMethod, DoSuperMethod and HookEntry) in the `programmer'
  879.        directory as well as the most common pragma files and some
  880.        examples of varargs functions. See Amiga-FAQ Archive.
  881.   
  882.      ---------- Footnotes ----------
  883.   
  884.      (1)  This problem arises most frequently for owners of Aztec which
  885.   is no longer supported and owners of Dice, which has sometimes rather
  886.   incomplete libraries. I own both ...
  887.   
  888.   4.12 Where do I find the function xxx?
  889.   ======================================
  890.   
  891.      If you are not sure about the name of the appropriate function for a
  892.   certain job or in which library to find it, you can search in these
  893.   places:
  894.      * In the Autodocs for each library you find at the very beginning a
  895.        contents table listing all functions available in this library.
  896.        They are sorted alphabetically, just like in the rest of the
  897.        Autodocs.  In the body part of the Autodocs you find complete
  898.        explanations and specifications for each library function. See
  899.        Includes.
  900.   
  901.      * The .FD files also offer a very compact overview over all functions
  902.        of the diverse libraries, complete with a short information about
  903.        the function arguments. If you already know roughly what you
  904.        search for and e.g. only need the precise order of the arguments,
  905.        you can find all needed information here. See Pragmas.
  906.   
  907.      Dr. Peter Kittel, peterk@cbmger.de.so.commodore.com
  908.   
  909.   4.13 The GNU C compiler: general information and installation
  910.   =============================================================
  911.   
  912.      This chapter contains general and installation information about the
  913.   amiga-port of the GNU C compiler gcc.
  914.   
  915.   4.13.1 Current Version
  916.   ----------------------
  917.   
  918.      Gcc current version is now 2.6.0 and 2.6.1 is in work.  It does
  919.   include a new version of ixemul.library, v40.3, but users are urged to
  920.   get ixemul404.lha on Aminet site or my own FTP site, due to errors for
  921.   68000 systems. A new library, libnix, avoid using ixemul.library.
  922.   2.6.1 will include protos, like SAS-C, making SASC ports to GCC easier.
  923.   A new assembler, gas-2.5 is included, a package called q_anote enables
  924.   output of mixing C/Asm code for debugging purposes.  Work is in
  925.   progress to implement stack growing facility, thus avoiding setting
  926.   stack before launching gcc.
  927.   
  928.   4.13.2 Requirements
  929.   -------------------
  930.   
  931.      Any Amiga (ranging from A1000 upto A4000/40) will run amigados-gnu
  932.   utilities. A minimum of 4MB memory is needed in order to compile
  933.   small/medium projects. More memory will be needed for large projects,
  934.   such as recompiling gcc itself, or programming C++. Gigamem and VMM do
  935.   work with GCC so *maybe* less memory will work. But in this case, an
  936.   MMU equipped Amiga (A3000,A4000/40) is necessary.  See 68EC0xx.
  937.   
  938.      A full installation, including C++/ObjC related files, inline
  939.   headers, cbm-headers, (see Includes) roughly requires about 20 MB of HD
  940.   space.
  941.   
  942.      Support for 1.2/1.3 is dropped. If you have 1.2/1.3, get a better
  943.   Kickstart version. Gcc works under KS 1.2/1.3, but the full
  944.   functionality is only available under KS 2.x+. A fast CPU (eg.
  945.   68030@25MHz or better) is also of help.
  946.   
  947.   4.13.3 Authors
  948.   --------------
  949.   
  950.      Gcc and related GNU-software has been ported to the Amiga by the
  951.   following folks: See How to get help.
  952.            Gcc v2.2.2 port:   Markus Wild
  953.            Gcc v2.3.3 port:   Markus Wild
  954.            Gcc v2.4.5 port:   Philippe Brand, Lars Hecking, Fred Fish
  955.            Gcc v2.5.0 and up: Philippe Brand, Fred Fish, Leonard Norrgard
  956.        
  957.            Ixemul.library:    Markus Wild, Leonard Norrgard, R. Luebbert
  958.            Libnix:           Matthias Fleischer, Gunther Nikl
  959.                Gerlib:            Gerhard Mueller
  960.   
  961.   4.13.4 Sources for Gcc
  962.   ----------------------
  963.   
  964.      All GCC sources & binaries are available on:
  965.   
  966.     1. Aminet sites (wuarchive.wustl.edu and mirrors such as ftp.luth.se)
  967.        in /pub/aminet/dev/gcc
  968.   
  969.     2. Ramses The Amiga Flying BBS:
  970.                 +33-1-60037015  HST Dual v32 terbo 4800-21600
  971.                     +33-1-60037713  SupraFax v32bis    4800-14400
  972.                     +33-1-60037716  Tornado v22bis     1200-2400
  973.        in Topic `Development', Area `Gcc' (are 156).
  974.   
  975.      GNU source code is available on:
  976.   
  977.     1. the same FTP site you've taken the binary distribution from
  978.   
  979.     2. gnu.prep.ai.mit.edu (18.71.0.38) in `/pub/gnu'
  980.   
  981.     3. Ramses The Amiga Flying BBS in Topic
  982.        `AmigaUnix/Unix/Linux/NetBSD', Area `Gnu Source Code'
  983.   
  984.      These archives should contain everything necessary to get you going,
  985.   they don't include sources for ixemul.library, which are available on
  986.   Aminet sites in `/pub/aminet/dev/gcc/ixemsrc3947.tar.gz' (as of this
  987.   writing, work is in  progress for the v40 version of ixemul.library,
  988.   sources will be available on an Aminet site near you).
  989.   
  990.      As stated by Richard Stallman of the FSF:
  991.   
  992.      "The GPL says that any distribution of binaries must contain either
  993.   the source code or a written offer to supply source code (see the GPL
  994.   for details of what is required)."
  995.   
  996.   4.13.5 Inline Headers
  997.   ---------------------
  998.   
  999.      The inline headers for gcc can be created from the original CBM fd
  1000.   files.  See Includes. See Pragmas. They can be created as follows:
  1001.   
  1002.        CLI> Assign INCLUDE: GCC:os-include
  1003.        CLI> Assign FD: INCLUDE:fd
  1004.        CLI> Makedir INCLUDE:inline
  1005.        CLI> cd USR:bin/geninline
  1006.        CLI> gen31
  1007.   
  1008.      This will create all inline-headers in `GCC:os-include/inline'.  If
  1009.   you have 2.0 headers, use gen20 instead, if you have 3.0, use gen30.
  1010.   OS3.1 (rev 40.13) inline headers are included with the current version
  1011.   of gcc. See Current Version.
  1012.   
  1013.      NOTE: perl scripts do not handle correctly AmigaDOS include files,
  1014.   which seems to mean they are somewhat broken. This needs some voluntary
  1015.   work ...
  1016.   
  1017.      There is also another way of generating inline headers, using
  1018.   fd2inline program:
  1019.   
  1020.        CLI> fd2inline <fd_file> <proto_file>
  1021.   
  1022.   4.13.6 Amiga Libraries
  1023.   ----------------------
  1024.   
  1025.      Starting from this release an AmigaDOS compliant library is provided,
  1026.   thanks to libnix authors (Matthias Fleischer and Gunther Nikl).
  1027.   
  1028.      Anyway if you want to rebuild one, there are two methods:
  1029.   
  1030.      1) Using hunk2gcc; the AmigaDOS object converter made by Markus
  1031.   Wild. To achieve this, simply grab a copy of latest amiga.lib (from
  1032.   Commodore Development Kit, see Includes) and make a new directory where
  1033.   you want your converted object files to go, cd into it, and enter
  1034.   
  1035.            hunk2gcc amiga.lib [..further libs if you like..]
  1036.   
  1037.      This generates an a.out object file for every program unit present
  1038.   in the hunk file (in this case, from amiga.lib).
  1039.   
  1040.      As the final step convert all those files into an a.out style
  1041.   library by issuing:
  1042.   
  1043.            ar qc libamiga.a obj.*
  1044.            ranlib libamiga.a
  1045.   
  1046.      The ranlib run builds a symbol table in the archive, and makes
  1047.   accesses to the library much faster.
  1048.   
  1049.      2) Creating a libamiga.a library with libnix is fairly easy, but
  1050.   takes some time. Just uncompress sources.lha from libnix distribution
  1051.   and run a `make libamiga.a'.
  1052.   
  1053.      *Note:* As long as you make no AmigaDOS specific calls, you can
  1054.   create a dummy library using:
  1055.   
  1056.          cat "int dummy;" >dummy.c
  1057.          gcc -c dummy.c
  1058.          ar crv libamiga.a dummy.o
  1059.          mv libamiga.a gcc:lib
  1060.   
  1061.   4.13.7 Installation
  1062.   -------------------
  1063.   
  1064.     1. If this is your first installation of GCC:
  1065.   
  1066.        Do the following:
  1067.   
  1068.             cd place_with_lot_of_space      ; EDIT! specify one
  1069.             makedir gnu
  1070.             lha x gcc260-base.lha           ; first part, you need it
  1071.   
  1072.        Now you have to append `gnu/s/user-startup' to your
  1073.        `s:user-startup' (replace Devel:GNU by your own gnu path).
  1074.   
  1075.        Continue:
  1076.   
  1077.             execute gnu/s/user-startup      ; makes important assigns
  1078.             copy gnu/envarc/#? ENVARC:
  1079.   
  1080.        *Edit* the following lines!  If you have a 68000 or 68010 Amiga,
  1081.        remove the "-020" from the following lines wherever it appears!
  1082.   
  1083.             lha x gcc260-c-020.lha      ; C-compiler part; you need it
  1084.             lha x gcc260-doc.lha        ; only if you want Gcc documentation
  1085.             lha x gcc260-c++-020.lha    ; only if you want C++
  1086.             lha x gcc260-objc-020.lha   ; only if you want Objective-C
  1087.             lha x gcc260-utils.lha      ; only if you want additional utilities
  1088.                                         ; (recommended for Unix compatibility)
  1089.             lha x gcc260-utilsdoc.lha   ; if you want all utilities documentation
  1090.   
  1091.        You must restore links between some programs by running the script
  1092.        `restorelinks':
  1093.   
  1094.             sh /gnu/s/restorelinks      ; EDIT! Append a " copy" to this line
  1095.                                         ; if you don't want to use makelink
  1096.                                         ; but rather copy file
  1097.   
  1098.        Last part:
  1099.   
  1100.             lha x gcc260-diffs.lha      ; if you want to rebuild all distribution
  1101.             lha x gcc260-texi.lha       ; if you want to build Postscript doc files
  1102.   
  1103.        Now skip to next paragraph and happy compiling!
  1104.   
  1105.     2. If you "upgrade" your gcc environment from v2.5.x, just unarchive
  1106.        first 2 archives as it would normally include all what you need
  1107.        (thus gcc260-base and gcc260-c). Make sure you delete your
  1108.        previous ixemul.library wherever it is (usually LIBS:).
  1109.   
  1110.   
  1111.      *Note*:  new version of ixemul.library is provided, make sure you
  1112.   don't have another copy somewhere which may conflict with gcc.
  1113.   
  1114.   4.13.8 Compiling
  1115.   ----------------
  1116.   
  1117.      What about a nice Hello World ?
  1118.   
  1119.        #include <stdio.h>
  1120.        
  1121.        main()
  1122.        {
  1123.          printf("Hello World!\n");
  1124.        }
  1125.   
  1126.      This was pretty simple ;-) Now we have to compile it.  There's a lot
  1127.   of options in gcc but simplest way to compile this would be:
  1128.   
  1129.        CLI> gcc -o hello hello.c
  1130.   
  1131.      Simple ?
  1132.   
  1133.      Here's more options.
  1134.   
  1135.      Target processor for Motorola family: You can compile plain 68000
  1136.   code, 68020, 68030, 68040, 68881 (have a look at GCC documentation,
  1137.   either in info or AmigaGuide format, chapter `Invoking Gcc/SubModel
  1138.   Options/M680X0 Options for Motorola specific compilation flags').
  1139.   
  1140.        CLI> gcc -m68020 -m68881 -o hello hello.c
  1141.   
  1142.      This will compile your programs using 68020 code and direct calls to
  1143.   math-processor, and will link with accelerated libraries, located in
  1144.   `GCC:lib/lib020'.
  1145.   
  1146.      Optimization: Either you don't want optimization, or you can provide
  1147.   `-O', which will optimize your code, or if you really want top
  1148.   optimization, use `-O2' flag (for more discussion about optimization,
  1149.   read info or AmigaGuide doc chapter Invoking Gcc/Optimize Options).
  1150.   There's now even a `-O3' optimization option, which will go even
  1151.   further.
  1152.   
  1153.        CLI> gcc -O2 -o hello hello.c
  1154.   
  1155.      You'll never have a "Hello World" program running so fast ;-)
  1156.   
  1157.      Code generation: Perhaps you want to generate resident programs.
  1158.   Flag is -resident, at compile and link stage.
  1159.   
  1160.        CLI> gcc -resident -o hello hello.c
  1161.   
  1162.      Of course you can mix all options, resulting in:
  1163.   
  1164.        CLI> gcc -O2 -m68020 -m68881 -resident -o hello hello.c
  1165.   
  1166.      This will make a 68020+68881 executable highly optimized and
  1167.   resident.
  1168.   
  1169.      IMPORTANT: If you only use AmigaDOS functions or you don't want to
  1170.   use ixemul for philosophical reasons, you can get rid of ixemul.library
  1171.   with:
  1172.   
  1173.        CLI> gcc -noixemul -o foobar foobar.c
  1174.   
  1175.      provided you have libnix distribution (included with 2.6.0
  1176.   distribution).
  1177.   
  1178.   4.13.9 How to get help
  1179.   ----------------------
  1180.   
  1181.      The current amiga-gcc-port maintainer is available:
  1182.   
  1183.            Philippe BRAND
  1184.            Fidonet: Ramses The Amiga Flying BBS 2:320/104.21
  1185.            Email:   phb@colombo.telesys-innov.fr (ONLY for personnal email).
  1186.            Ftp:     colombo.telesys-innov.fr:/pub/amigados-gnu
  1187.                     or /pub/incoming/uploads for uploads.
  1188.   
  1189.      There's also an amiga-gcc mailing list running in Finland.  See
  1190.   Mailing lists.  Philippe Brand will forward all questions to that list,
  1191.   but you'd be better off using it directly ;)
  1192.   
  1193.